﻿Imports System
Imports System.Collections

Public Class ClienteBE

#Region "Campos y Propiedades"
    Private _IdCliente As Integer
    Private _Nombre As String
    Private _Direccion As String
    Private _FechaCreacion As DateTime
    Private _FechaModificacion As DateTime
    Private _Estado As Boolean
    Private _EstadoDescripcion As String

    Public Property IdCliente() As Integer
        Get
            Return _IdCliente
        End Get
        Set(ByVal value As Integer)
            _IdCliente = value
        End Set
    End Property

    Public Property Nombre() As String
        Get
            Return _Nombre
        End Get
        Set(ByVal value As String)
            _Nombre = value
        End Set
    End Property
    Public Property Direccion() As String
        Get
            Return _Direccion
        End Get
        Set(ByVal value As String)
            _Direccion = value
        End Set
    End Property


    Public Property Estado() As String
        Get
            Return _Estado
        End Get
        Set(ByVal value As String)
            _Estado = value
        End Set
    End Property

    Public Property EstadoDescripcion() As String
        Get
            Return _EstadoDescripcion
        End Get
        Set(ByVal value As String)
            _EstadoDescripcion = value
        End Set
    End Property

    Public Property FechaCreacion() As DateTime
        Get
            Return _FechaCreacion
        End Get
        Set(ByVal value As DateTime)
            _FechaCreacion = value
        End Set
    End Property

    Public Property FechaModificacion() As DateTime
        Get
            Return _FechaModificacion
        End Get
        Set(ByVal value As DateTime)
            _FechaModificacion = value
        End Set
    End Property


#End Region

#Region "Constructores"

    Public Sub New()

    End Sub

    Public Sub New(ByVal IdCliente As Integer, ByVal Nombre As String, ByVal Estado As String, ByVal FechaCreacion As DateTime, ByVal FechaModificacion As DateTime)
        Me._IdCliente = IdCliente
        Me._Nombre = Nombre
        Me._Estado = Estado
        Me._FechaCreacion = FechaCreacion
        Me._FechaModificacion = FechaModificacion
    End Sub
#End Region

End Class


Public Class ClienteBECollection
    Inherits CollectionBase

    Default Public Property Item(ByVal index As Integer) As ClienteBE
        Get
            Return CType(List(index), ClienteBE)
        End Get
        Set(ByVal value As ClienteBE)
            List(index) = value
        End Set
    End Property

    Public Function Add(ByVal value As ClienteBE) As Integer
        Return (List.Add(value))
    End Function

    Public Function IndexOf(ByVal value As ClienteBE) As Integer
        Return (List.IndexOf(value))
    End Function

    Public Sub Insert(ByVal index As Integer, ByVal value As ClienteBE)
        List.Insert(index, value)
    End Sub

    Public Sub Remove(ByVal value As ClienteBE)
        List.Remove(value)
    End Sub

    Public Function Contains(ByVal value As ClienteBE) As Boolean
        Return (List.Contains(value))
    End Function
End Class